<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ page contentType="text/html; charset=utf-8"%>
	<%@ include file="/commons/taglibs.jsp"%>
	<head>
		<%@ include file="/commons/css_js_head.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>修改系统公告</title>
		<script type="text/javascript">
//复写Url
doUpdateUrl = "${ctx }/permission/systemMessageAction!doUpdate.ts";
doReturnUrl = "${ctx }/permission/systemMessageAction!doList.ts";

//更新
function doUpdate() {

	var _form = document.forms[0];
	if (doUpdateUrl == '') {
		alert('请设置正确的URL!');
		return false;
	}

	_form.action = doUpdateUrl;

}
//校验数据
$(document).ready(function(){
	$.formValidator.initConfig({formid:"form1",alertmessage:true,onerror:function(msg){alert(msg)},onsuccess:function(){doUpdate();}});
	$("#systemMessage_title").formValidator().inputValidator({min:1,max:40,onerror:"请输入公告标题，且只能在1-40个汉字之间"});
	$("#systemMessage_startDate").formValidator().inputValidator({min:1,max:32,onerror:"请选择公告有效开始时间"});
	$("#systemMessage_endDate").formValidator().inputValidator({min:1,max:32,onerror:"请选择公告有效结束时间"});
	$("#systemMessage_content").formValidator().inputValidator({min:1,max:512,onerror:"请输入公告内容，且只能在1-512个汉字之间"});
});

</script>
	</head>
	
	<body style="overflow-x: hidden">
	
	<s:form action="/permission/systemMessageAction" id="form1" method="post" theme="simple" >
		<s:hidden name="systemMessage.smId"></s:hidden>
		<s:hidden name="systemMessage.dicMsgType"></s:hidden>
		<s:hidden name="systemMessage.operatorUser"></s:hidden>
		<s:hidden name="systemMessage.operatorDate"></s:hidden>
		
		<div class="mTitle">
			<span class="hidsearch"></span>
			<b class="bbig">公告修改</b>
			带<b class="fred"> * </b>号为必填项
		</div>
		
			<!--list -->
			<div class="mainList">

				<table class="addTable">

					<tr>
						<th width="5%">
							<b class="fred">*</b>公告标题：
						</th>
						<td width="40%">
							<s:textfield id="systemMessage_title" name="systemMessage.title" theme="simple" size="35"></s:textfield>
						</td>
					</tr>
					<tr>
						<th width="5%">
							<b class="fred">*</b>公告有效时间：
						</th>
						<td width="40%">
							<input type="text" value='<fmt:formatDate value="${systemMessage.startDate}" />' name="systemMessage.startDate" id="systemMessage_startDate" class="Wdate" size="12" onfocus="WdatePicker({el:'systemMessage_startDate',dateFmt:'yyyy-MM-dd'})" readonly="readonly" />
		   					<i>至</i>
		    				<input type="text" value='<fmt:formatDate value="${systemMessage.endDate}" />' name="systemMessage.endDate" id="systemMessage_endDate" class="Wdate" size="12" onfocus="WdatePicker({el:'systemMessage_endDate',dateFmt:'yyyy-MM-dd'})" readonly="readonly" />
						</td>
					</tr>
					<tr>
						<th width="5%">
							<b class="fred">*</b>公告内容：
						</th>
						<td width="40%" rowspan="3">
							<s:textarea id="systemMessage_content" name="systemMessage.content" theme="simple"></s:textarea>
						</td>
					</tr>
				</table>

			</div>
			<!--end table -->

			<div class="addToolbar">
				<p>
					<input class="btn" name="btn_confirm" value="确定" type="submit" />
					<input class="btn" name="btn_return" value="返回" type="button" onclick="doReturn();" ; />
				</p>
			</div>
			
		</s:form>

	</body>
</html>
